export const tableOption = {
  border: true, //是否带有纵向边框
  selection: true, //行最前面的选择框
  menuAlign: "center",
  // labelWidth: 110,//设置列名称长度
  // searchLabelWidth: 110,//搜索按钮是否单独成行，并控制搜索按钮的长度
  searchIndex: 4, //筛选收缩
  searchIcon: true,
  align: "center", //对齐方式
  emptyText: '自定义暂无数据提示语',
  column: [
    {
      label: "属性ID",
      prop: "skuId",
      type: "input",
      hide: true,
      editDisabled: true,
      editDisplay: false,
      addDisplay: false,
    },
    {
      label: "商品",
      prop: "spuId",
      type: "select",
      props: {
        label: 'name',
        value: 'spuId'
      },
      formatter: (val, value, label) => {
        return `${label}(${value})`
      },
      dicUrl: `/admin/product/spu/list`,
      search: true,
      span: 24
    },
    {
      label: "sku名称",
      prop: "skuName",
      type: "input",
      span: 24
    },
    {
      label: "sku图片",
      prop: "imgUrl",
      type: "upload",
      listType: 'picture-img',
      dataType: 'string',
      tip: '只能上传jpg/png文件,且不超过500kb',
      action: '/admin/sys-file/upload',
      propsHttp: {
        res: 'data'
      },
      span: 24
    },
    {
      label: "售价",
      prop: "priceFee",
      type: "input",
      span: 12
    },
    {
      label: "市场价",
      prop: "marketPriceFee",
      type: "input",
      span: 12
    },
    {
      label: "商品编码",
      prop: "partyCode",
      type: "input",
      span: 12
    },
    {
      label: "商品条形码",
      prop: "modelId",
      type: "input",
      span: 12
    },
    {
      label: "商品重量",
      prop: "weight",
      type: "input",
      span: 12
    },
    {
      label: "商品体积",
      prop: "volume",
      type: "input",
      span: 12
    },
    {
      label: "可售卖库存",
      prop: "stock",
      type: "input",
      span: 12
    },
    {
      label: "实际库存",
      prop: "actualStock",
      type: "input",
      span: 12
    },
    {
      label: "锁定库存",
      prop: "lockStock",
      addDisplay: false,
      type: "input",
      span: 12
    },
    {
      label: "状态",
      prop: "status",
      type: 'switch',
      dicData: [{
        label: '禁用',
        value: false
      }, {
        label: '启用',
        value: true
      }],
      search: true,
      value: 1,
      span: 12
    },
    {
      label: "创建人",
      prop: "createBy",
      type: "input",
      editDisabled: true,
      editDisplay: false,
      addDisplay: false,
      span: 12
    },
    {
      label: "创建时间",
      prop: "createTime",
      type: "datetime",
      dateDefault: true,
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      editDisabled: true,
      editDisplay: false,
      addDisplay: false,
      span: 12
    },
  ]
}
